<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link rel='stylesheet' href='/static/css/markdown.css' type='text/css' />
    <!-- Bootstrap core CSS -->
    <link href="/static/bootstrap3/dist/css/bootstrap.css" rel="stylesheet">
    <!-- Bootstrap theme -->
    <link href="/static/bootstrap3/dist/css/bootstrap-theme.min.css" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link href="/static/css/theme.css" rel="stylesheet">
    <link href="/static/css/code.css" rel="stylesheet">
    <link rel="StyleSheet" href="/static/js/tree/dtree.css" type="text/css" />
    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
    <script src="/static/bootstrap3/dist/js/html5shiv.js"></script>
    <script src="/static/bootstrap3/dist/js/respond.min.js"></script>
    <![endif]-->
    <script src="/static/js/rainbow-custom.min.js"></script>
    <script src="/static/js/jquery.js"></script>
    <script src="/static/js/dtree.js"></script>
    <title>Swoole文档中心</title>
</head>
<body>
<div class="navbar-wrapper">
    <div class="container">
        <div class="navbar navbar-inverse navbar-fixed-top">
            <div class="container" style="width: 1040px;">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a class="navbar-brand" href="/wiki.php">Swoole文档中心</a>
                </div>
                <div class="navbar-collapse collapse">
                    <ul class="nav navbar-nav">
                        <!--                        <li class="active"><a href="/md.php">文档首页</a></li>-->
                        <li><a href="/index.html">Swoole首页</a></li>
                        <li><a href="/project/road_map.md">Swoole项目路线图</a></li>
                        <li><a href="/project/change_log.md">版本更新记录</a></li>
                    </ul>
                </div>
            </div>
        </div>

    </div>
</div>
<div class="main">
    <div class="main_left">
        <div class="inner-containner">
            <div id="tree">
            </div>
        </div>
    </div>

    <div class="main_right">
        <div class="container">
            <div id="readme" class="blob instapaper_body">
                <article class="markdown-body entry-content" itemprop="mainContentOfPage">
                    {{$content}}
                </article>
            </div>
        </div><hr style="clear: both" />
        <!-- Duoshuo Comment BEGIN -->
        <div class="ds-thread"></div>
        <script type="text/javascript">
            var duoshuoQuery = {short_name:"www4swoole"};
            (function() {
                var ds = document.createElement('script');
                ds.type = 'text/javascript';ds.async = true;
                ds.src = 'http://static.duoshuo.com/embed.js';
                ds.charset = 'UTF-8';
                (document.getElementsByTagName('head')[0]
                    || document.getElementsByTagName('body')[0]).appendChild(ds);
            })();

            var wiki_tree_data = {{$tree}};
            $(document).ready(function() {
                d = new dTree('d');
                d.config.useLines = false;

                d.add(0,-1,'Swoole文档中心', 'index.md');
                var link = ''
                for(var i=0;i<wiki_tree_data.length;i++) {
                    if(wiki_tree_data[i]["link"]!='') {
                        link = wiki_tree_data[i]["link"]+'.md'
                    } else {
                        link = 'javascript:void(0)'
                    }
                    d.add(wiki_tree_data[i]["id"],
                          wiki_tree_data[i]["pid"],
                          wiki_tree_data[i]["text"],
                          link);
                }
                $('div#tree').html(d.toString());
                d.openAll();
            });
        </script>
        <!-- Duoshuo Comment END -->
    </div>
    <div style="clear: both"></div>
</div>
</body>
</html>
